// 创建历史记录仓库
export const state = () => {
  return {
    // 数组，每一个元素为一个对象，包含了航班信息
    historyList: [],
    searchHistory: {}

  }
}

export const mutations = {
  addHistory(state, data) {
    state.historyList.unshift(data)
    if (state.historyList.length > 5) {
      state.historyList.splice(5)
    }
  },
}
